import Login from "../pages/Login";
import List from "../pages/admin/products/List";
import Edit from "../pages/admin/products/Edit";
import PageNotFound from "../pages/PageNotFound";
import Home from "../pages/admin/dashboard/Home";
import Add from "../pages/admin/products/Add";

export const mainRoutes = [
    {
        path:'/login',
        component:Login
    },
    {
        path:'/404',
        component:PageNotFound
    }
]

export const adminRoutes = [
    {
        title:'Dashboard',
        show:true,
        children:[
            {
                path:'/admin/dashboard',
                component:Home,
                exact:true,
                show:true,
                title:'仪表盘'
            },
            {
                path:'/admin/dashboard2',
                component:Home,
                exact:true,
                show:true,
                title:'监控页'
            }
        ]
    },
    {
        title:'商品管理',
        show:true,
        children:[
            {
                path:'/admin/products/list',
                component:List,
                exact:true,
                show:true,
                title:'商品列表'
            },
            {
                path:'/admin/products/edit/:id',
                component:Edit,
                show:false,
                exact:true
            },
            {
                path:'/admin/products/add',
                component:Add,
                show:false,
                exact:true
            }
        ]
    },

]